#pragma once

#include "vec2f.h"
#include "pnt3f.h"

namespace collision
{
	enum class collision_status : int
	{
		miss,
		hit,
		inside
	};

	struct collision_info_t
	{
		pnt3f pos;
		vec3f normal;
		vec2f uv;
		float t;  
		void* user_data;
		collision_status status;
	};

	inline collision_info_t collision_info_tc(const pnt3f pos, const	vec3f normal, const vec2f uv, 
		const float t, void* const user_data, const collision_status status)
	{
		collision_info_t res;
		res.pos = pos;
		res.normal = normal;
		res.uv = uv;
		res.t = t;
		res.user_data = user_data;
		res.status = status;
		return res;
	}

	inline collision_info_t make_miss_collinfo()
	{
		return collision_info_tc(origin(), zero_vec3f(),
			zero_vec2f(), -1.f, nullptr, collision_status::miss);
	}

}